<template>
    <div>
        <HelloWorld @scuure="but"></HelloWorld>
    </div>
</template>

<script setup lang="ts">
import HelloWorld from "@/components/HelloWorld.vue"
import { usersEdit } from '@/API/user.api';
import { reactive } from "vue";
import { ElMessage } from 'element-plus'
const but = async (form) => {
    console.log(form);
    console.log('submit!', form)
    let ser = await usersEdit({ id: form.id, password: form.newpwd, purview: form.acctive, phone: form.phone, head: form.head })
    console.log(ser.data.code);
    if (ser.data.code) {
        ElMessage({
            message: '修改成功',
            type: 'success',
        })
    }
}

</script>

<style scoped>

</style>